﻿<%@ page contentType="text/html; charset=UTF-8" language="java" import="java.util.*"%>
<%
   	String base = request.getContextPath();
   	String[] sms = (String[])request.getAttribute("SMS");
   	String message = (String)request.getAttribute("Message");
   	if(message == null) message = "";

   	String server = null;
   	String user = null;
   	String passWord = null;
   	String content = null;

   	if(sms != null && sms.length == 4){
   		server = sms[0];
	   	user = sms[1];
	   	passWord = sms[2];
	   	content = sms[3];
   	}
%>
<html>
<html>
<head>
<title>短信中心</title>
<jsp:include page="../public/publicJs.jsp" flush="false"></jsp:include>
<script src="<%=base%>/js/validator.js"></script>
</head>
<body topmargin="0" leftmargin="0" class="dialog" onLoad="public_onload();">
<form name="form1" method="post" action="<%=base%>/sms.crm?method=save" onSubmit="return checkData(this);">
	<table width="100%" height="100%"  border="0" align="center" cellpadding="0" cellspacing="0" class="maintable">
	  <tr valign="top" class="tree_title_txt">
			<td class="tree_title_txt" height=26 align=center valign="middle">短信设置</td>
	  </tr>
	 <tr valign="top">
	 <td>
	<center>
	<div class="tabBody2">
		<table width=98% align="center" width="100%" border="0" cellspacing="0" cellpadding="0" class="maintab_content_table">
			<tr valign="top">
				<td class="Form_BBS_Lable" valign="middle" width="15%">服务器地址:</td>
          		<td class="Form_BBS_td" valign="middle" width="25%"><input type="text" class="text_220" style="width:300px" name="server" value="<%=server!=null?server:""%>"/></td>
          		<td class="Form_BBS_Lable" valign="middle" width="10%">用户名:</td>
          		<td class="Form_BBS_td" valign="middle" width="20%"><input type="text" class="text_220" style="width:80px" name="user" value="<%=user!=null?user:""%>"/></td>
          		<td class="Form_BBS_Lable" valign="middle" width="10%">密码:</td>
          		<td class="Form_BBS_td" valign="middle" width="20%"><input type="password" class="text_220" style="width:80px" name="passWord" value="<%=passWord!=null?passWord:""%>"/></td>
          	</tr>
        	<tr>
          		<td align="center" colspan="6">
          			<textarea name="content" style="height:365px;width:98%" row="500" col="200"><%=content!=null?content:"" %></textarea>
          		</td>
          	</tr>
          	<tr>
          		<td align="left" colspan="6">
          			注:单条短信最多能发送60个汉字.多于60个汉字的信息,系统将自动以多条短信发送.
          		</td>
          	</tr>
        </table>
    </div>
    </center>

    <div style="margin:12px">
	 	<table width=96% align=center border="0" cellspacing="0" cellpadding="0" style="margin-top:-6px">
			<tr>
				<td width="75%" valign="middle"><div id="myLoad" style="text-align:left"></div></td>
				<td width="25%" valign="middle"><jsp:include page="../form/sform/btn_formsave.jsp" flush="true"></jsp:include></td>
			</tr>
		</table>
	<%
		if(message != null && message.trim().length()>0){
	%>
			<script type="text/javascript">
				document.getElementById("myLoad").innerHTML = "<img src='<%=base%>/images/info.gif' alt='数据保存信息' class='icon1' border='0' align='absmiddle'/> <%=message%>";
			</script>
	<%
		}
	%>
	 </div>
	</td>
   </tr>
</table>
</form>
<div id="ly" style="position:absolute;top:0px; filter:alpha(opacity=60); background-color:#777; z-index:2; left:0px; display:none"></div>
<div id="Layer2" align="center" style="display:none; background:#fff; width:160px;height:20px;left:40%;top:40%;position:absolute; padding: 5px 5px 5px 5px; z-index:3; filter:alpha(opacity=60);">
<font color="#FF0000" style="font-size:12px"><img src="<%=base%>/images/loading.gif" class="icon1" border="0" align="absmiddle"/> 数据保存中,请稍后...</font>
</div>
<script language="javascript">unLock();</script>
</body>
</html>